Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON status to simplify automatic monitoring #25

Closed
wants to merge 1 commit into from
Closed

JSON status to simplify automatic monitoring #25

wants to merge 1 commit into from

Conversation

dkerwin
Copy link

@dkerwin dkerwin commented Oct 24, 2013

Hi,

we modified the the status resource to return json instead of a HTML table. This can be used to simplify monitoring. Example output looks like this:

{
  upstream_servers: 4,
  generation: 1,
  peers: [
    {
      upstream: "example-api.com",
      member: "192.168.1.1:80",
      status: "up",
      rise_count: 8,
      fall_count: 0,
      check_type: "http"
    },
    {
      upstream: "www.example-app.com",
      member: "192.168.1.2:80",
      status: "up",
      rise_count: 8,
      fall_count: 0,
      check_type: "http"
    },
    {
      upstream: "www.company.com",
      member: "192.168.1.3:80",
      status: "up",
      rise_count: 9,
      fall_count: 0,
      check_type: "http"
    },
  ]
}

There is lot's of room for improvement regarding the structure of the hash but i still hope you like the idea.

Cheers!
Daniel

@guillaumerose
Copy link

Great idea ! Thanks for this patch.

@yaoweibin
Copy link
Owner

Acctually, I have added the json and csv output page in the develop branch: https://github.com/yaoweibin/nginx_upstream_check_module/blob/development/ngx_http_upstream_check_module.c

the docs is the same as tengine: http://tengine.taobao.org/document/http_upstream_check.html

@XavM
Copy link

XavM commented Nov 12, 2013

What you've done in the develop branch about specifying a default check_status as csv|json|html is great, and being able to override it using the format query string is really good.

When do you plan to integrate this in master ?

@dkerwin
Copy link
Author

dkerwin commented Nov 14, 2013

@XavM 👍 Would be awesome to see that merged into master

@vaijab
Copy link

vaijab commented Feb 15, 2014

Would be great if you could merge into master. I can do testing and report any issues.

@scalp42
Copy link

scalp42 commented Aug 19, 2014

Any chances to see this in master?

@cgphillips
Copy link

+1

@yaoweibin
Copy link
Owner

OK. I'll do this merge in this weekend.

@XavM
Copy link

XavM commented Aug 21, 2014

Really good news
Thanks a lot

@lusis
Copy link

lusis commented Sep 6, 2014

wow I didn't even see this when I made my PR.

@scalp42 scalp42 mentioned this pull request Sep 29, 2014
@scalp42
Copy link

scalp42 commented Sep 29, 2014

@yaoweibin any updates please?

@yaoweibin
Copy link
Owner

I have added this json status page, very similar with tengine(http://tengine.taobao.org/document/http_upstream_check.html). See the master branch
https://github.com/yaoweibin/nginx_upstream_check_module/

@yaoweibin yaoweibin closed this Oct 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants